package fiveGame.element;

import java.io.Serializable;

/** 

* @author Tiangle 

* @version 创建时间：2021年9月4日 下午12:05:53 

* 

*/
public class Chesses implements Serializable{
	private int x;
	private int y;
	private int color;
	public Chesses(int x, int y, int color) {
		super();
		this.x = x;
		this.y = y;
		this.color = color;
	}
	@Override
	public String toString() {
		return "Chesses [x=" + x + ", y=" + y + ", color=" + color + "]";
	}
	
	public Chesses(int x, int y) {
		super();
		this.x = x;
		this.y = y;
	}
	public int getX() {
		return x;
	}
	public void setX(int x) {
		this.x = x;
	}
	public int getY() {
		return y;
	}
	public void setY(int y) {
		this.y = y;
	}
	public int getColor() {
		return color;
	}
	public void setColor(int color) {
		this.color = color;
	}
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + color;
		result = prime * result + x;
		result = prime * result + y;
		return result;
	}
	
	public boolean equals(Chesses obj) {
		return this.x==obj.getX()&&this.y==obj.getY();
	}
	
}
